package vista;
import java.awt.BorderLayout;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.GridLayout;
import java.awt.Insets;

import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JPanel;
import javax.swing.JProgressBar;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.JTextField;
import javax.swing.WindowConstants;
import javax.swing.border.BevelBorder;

/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class MainWindow extends javax.swing.JFrame {

	private JMenuBar mainMenuBar;
	private JLabel descriptionLabel;
	private JProgressBar progressBar;
	private JPanel rightPanel;
	private JButton connectButton;
	private JTextField fileField;
	private JLabel fileLabel;
	private JPanel leftButtonPanel;
	private JButton backButton;
	private JButton stopButton;
	private JPanel panel;
	private JLabel progressBarLabel;
	private JPanel leftProgessPanel;
	private JButton openFileButton;
	private JPanel leftFilePanel;
	private JTextField speedField;
	private JMenuItem menuOptions;
	private JButton saveButton;
	private JPanel rightButtonPanel;
	private JButton cleanFileButton;
	private JButton cleanButton;
	private JButton disconnectButton;
	private JScrollPane scrollPanel;
	private JTextArea descriptionPanel;
	private JButton mesureButton;
	private JTextField stepField;
	private JTextField spinField;
	private JTextField turnField;
	private JTextField walkField;
	private JLabel stepLabel;
	private JLabel spinLabel;
	private JLabel turnLabel;
	private JLabel walkLabel;
	private JLabel speedLabel;
	private JButton runButton;
	private JPanel leftDataPanel;
	private JPanel leftPanel;
	private JPanel mainPanel;
	private JMenu menuEdit;

	public MainWindow() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			{
				mainPanel = new JPanel();
				GridLayout painelPrincipalLayout = new GridLayout(1, 2);
				painelPrincipalLayout.setHgap(5);
				painelPrincipalLayout.setVgap(5);
				painelPrincipalLayout.setColumns(2);
				getContentPane().add(mainPanel, BorderLayout.CENTER);
				mainPanel.setLayout(painelPrincipalLayout);
				{
					leftPanel = new JPanel();
					mainPanel.add(leftPanel);
					GridLayout painelEsquerdaLayout = new GridLayout(5, 1);
					painelEsquerdaLayout.setHgap(5);
					painelEsquerdaLayout.setVgap(5);
					painelEsquerdaLayout.setColumns(1);
					painelEsquerdaLayout.setRows(5);
					leftPanel.setPreferredSize(new java.awt.Dimension(231, 245));
					leftPanel.setLayout(painelEsquerdaLayout);
					{
						panel = new JPanel();
						leftPanel.add(panel);
					}
					{
						leftDataPanel = new JPanel();
						leftPanel.add(leftDataPanel);
						GridBagLayout painelEsquerdaTopoLayout = new GridBagLayout();
						leftDataPanel.setLayout(painelEsquerdaTopoLayout);
						leftDataPanel.setPreferredSize(new java.awt.Dimension(398, 64));
						{
							speedLabel = new JLabel();
							leftDataPanel.add(speedLabel, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
							speedLabel.setText("Speed");
						}
						{
							walkLabel = new JLabel();
							leftDataPanel.add(walkLabel, new GridBagConstraints(3, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
							walkLabel.setText("Walk");
						}
						{
							turnLabel = new JLabel();
							leftDataPanel.add(turnLabel, new GridBagConstraints(5, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
							turnLabel.setText("Turn");
						}
						{
							spinLabel = new JLabel();
							leftDataPanel.add(spinLabel, new GridBagConstraints(7, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
							spinLabel.setText("Spin");
						}
						{
							stepLabel = new JLabel();
							leftDataPanel.add(stepLabel, new GridBagConstraints(9, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
							stepLabel.setText("Step");
						}
						{
							speedField = new JTextField();
							leftDataPanel.add(speedField, new GridBagConstraints(1, 1, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
							speedField.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
						}
						{
							walkField = new JTextField();
							leftDataPanel.add(walkField, new GridBagConstraints(3, 1, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
							walkField.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
						}
						{
							turnField = new JTextField();
							leftDataPanel.add(turnField, new GridBagConstraints(5, 1, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
							turnField.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
						}
						{
							spinField = new JTextField();
							leftDataPanel.add(spinField, new GridBagConstraints(7, 1, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
							spinField.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
						}
						{
							stepField = new JTextField();
							leftDataPanel.add(stepField, new GridBagConstraints(9, 1, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
							stepField.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
						}
					painelEsquerdaTopoLayout.rowWeights = new double[] {0.0, 0.0, 0.0, 0.0};
					painelEsquerdaTopoLayout.rowHeights = new int[] {15, 15, 10, 10};
					painelEsquerdaTopoLayout.columnWeights = new double[] {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.1};
					painelEsquerdaTopoLayout.columnWidths = new int[] {10, 50, 6, 50, 6, 50, 6, 50, 6, 50, 10, 20};
					}
					{
						leftFilePanel = new JPanel();
						leftPanel.add(leftFilePanel);
						GridBagLayout painelEsquerdaArquivoLayout = new GridBagLayout();
						painelEsquerdaArquivoLayout.rowWeights = new double[] {0.0, 0.0, 0.0, 0.0};
						painelEsquerdaArquivoLayout.rowHeights = new int[] {15, 15, 10, 10};
						painelEsquerdaArquivoLayout.columnWeights = new double[] {0.0, 0.0, 0.0, 0.0, 0.0, 0.0};
						painelEsquerdaArquivoLayout.columnWidths = new int[] {10, 198, 6, 50, 50, 10};
						leftFilePanel.setLayout(painelEsquerdaArquivoLayout);
						{
							fileLabel = new JLabel();
							leftFilePanel.add(fileLabel, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
							fileLabel.setText("Arquivo (*.fis)");
							fileLabel.setSize(84, 16);
						}
						{
							fileField = new JTextField();
							leftFilePanel.add(fileField, new GridBagConstraints(1, 1, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(5, 3, 5, 3), 0, 0));
							fileField.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
							fileField.setSize(45, 23);
							fileField.setEditable(false);
						}
						{
							openFileButton = new JButton();
							leftFilePanel.add(openFileButton, new GridBagConstraints(3, 1, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(5, 3, 5, 3), 0, 0));
							openFileButton.setText("Open");
							openFileButton.setBorder(BorderFactory.createTitledBorder(""));
							openFileButton.setFont(new java.awt.Font("Bitstream Charter",0,12));
						}
						{
							cleanFileButton = new JButton();
							leftFilePanel.add(cleanFileButton, new GridBagConstraints(4, 1, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(5, 3, 5, 3), 0, 0));
							cleanFileButton.setText("Clean");
							cleanFileButton.setFont(new java.awt.Font("Bitstream Charter",0,12));
							cleanFileButton.setBorder(BorderFactory.createTitledBorder(""));
						}
					}
					{
						leftButtonPanel = new JPanel();
						GridBagLayout painelEsquerdaFundoLayout = new GridBagLayout();
						leftButtonPanel.setLayout(painelEsquerdaFundoLayout);
						leftPanel.add(leftButtonPanel);
						{
							connectButton = new JButton();
							leftButtonPanel.add(connectButton, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(5, 3, 5, 3), 0, 0));
							connectButton.setText("Connect");
							connectButton.setBorder(BorderFactory.createTitledBorder(""));
							connectButton.setSize(67, 23);
							connectButton.setFont(new java.awt.Font("Bitstream Charter",0,12));
						}
						{
							runButton = new JButton();
							leftButtonPanel.add(runButton, new GridBagConstraints(2, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(5, 3, 5, 3), 0, 0));
							runButton.setText("Run");
							runButton.setBorder(BorderFactory.createTitledBorder(""));
							runButton.setSize(65, 23);
							runButton.setFont(new java.awt.Font("Bitstream Charter",0,12));
						}
						{
							stopButton = new JButton();
							leftButtonPanel.add(stopButton, new GridBagConstraints(3, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(5, 3, 5, 3), 0, 0));
							stopButton.setText("Stop");
							stopButton.setBorder(BorderFactory.createTitledBorder(""));
							stopButton.setSize(44, 23);
							stopButton.setFont(new java.awt.Font("Bitstream Charter",0,12));
						}
						{
							backButton = new JButton();
							leftButtonPanel.add(backButton, new GridBagConstraints(5, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(5, 3, 5, 3), 0, 0));
							backButton.setText("Back");
							backButton.setBorder(BorderFactory.createTitledBorder(""));
							backButton.setSize(47, 23);
							backButton.setFont(new java.awt.Font("Bitstream Charter",0,12));
						}
						{
							mesureButton = new JButton();
							leftButtonPanel.add(mesureButton, new GridBagConstraints(4, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(5, 3, 5, 3), 0, 0));
							mesureButton.setText("Mesure");
							mesureButton.setBorder(BorderFactory.createTitledBorder(""));
							mesureButton.setFont(new java.awt.Font("Bitstream Charter",0,12));
						}
						{
							disconnectButton = new JButton();
							leftButtonPanel.add(disconnectButton, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(5, 3, 5, 3), 0, 0));
							disconnectButton.setText("Disconnect");
							disconnectButton.setBorder(BorderFactory.createTitledBorder(""));
							disconnectButton.setFont(new java.awt.Font("Bitstream Charter",0,12));
						}
					painelEsquerdaFundoLayout.rowWeights = new double[] {0.1, 0.1, 0.1, 0.1};
					painelEsquerdaFundoLayout.rowHeights = new int[] {7, 7, 7, 7};
					painelEsquerdaFundoLayout.columnWeights = new double[] {0.0, 0.0, 0.1, 0.1, 0.1, 0.1, 0.0};
					painelEsquerdaFundoLayout.columnWidths = new int[] {10, 80, 7, 7, 20, 7, 10};
					}
					{
						leftProgessPanel = new JPanel();
						GridBagLayout painelEsquerdaProgressaoLayout = new GridBagLayout();
						painelEsquerdaProgressaoLayout.rowWeights = new double[] {0.1, 0.1, 0.1, 0.1};
						painelEsquerdaProgressaoLayout.rowHeights = new int[] {7, 7, 7, 7};
						painelEsquerdaProgressaoLayout.columnWeights = new double[] {0.0, 0.1, 0.0, 0.1, 0.0};
						painelEsquerdaProgressaoLayout.columnWidths = new int[] {10, 7, 6, 7, 10};
						leftProgessPanel.setLayout(painelEsquerdaProgressaoLayout);
						leftPanel.add(leftProgessPanel);
						leftProgessPanel.setVisible(false);
						{
							progressBarLabel = new JLabel();
							leftProgessPanel.add(progressBarLabel, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
							progressBarLabel.setText("Progresso");
						}
						{
							progressBar = new JProgressBar();
							leftProgessPanel.add(progressBar, new GridBagConstraints(3, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
							progressBar.setPreferredSize(new java.awt.Dimension(196, 19));
						}
					}
				}
				{
					rightPanel = new JPanel();
					mainPanel.add(rightPanel);
					GridBagLayout painelDireitaLayout = new GridBagLayout();
					painelDireitaLayout.rowWeights = new double[] {0.0, 0.0, 0.0, 0.0, 0.0, 0.0};
					painelDireitaLayout.rowHeights = new int[] {10, 21, 226, 6, 19, 10};
					painelDireitaLayout.columnWeights = new double[] {0.0, 0.1, 0.0};
					painelDireitaLayout.columnWidths = new int[] {10, 7, 10};
					rightPanel.setLayout(painelDireitaLayout);
					{
						descriptionLabel = new JLabel();
						rightPanel.add(descriptionLabel, new GridBagConstraints(1, 1, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
						descriptionLabel.setText("Description");
					}
					{
						scrollPanel = new JScrollPane();
						rightPanel.add(scrollPanel, new GridBagConstraints(1, 2, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
						{
							descriptionPanel = new JTextArea();
							scrollPanel.setViewportView(descriptionPanel);
						}
					}
					{
						rightButtonPanel = new JPanel();
						GridLayout painelDireitaBotoesLayout = new GridLayout(1, 2);
						painelDireitaBotoesLayout.setHgap(5);
						painelDireitaBotoesLayout.setVgap(5);
						painelDireitaBotoesLayout.setColumns(2);
						rightButtonPanel.setLayout(painelDireitaBotoesLayout);
						rightPanel.add(rightButtonPanel, new GridBagConstraints(1, 4, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
						{
							cleanButton = new JButton();
							rightButtonPanel.add(cleanButton);
							cleanButton.setText("Clean");
							cleanButton.setBorder(BorderFactory.createTitledBorder(""));
							cleanButton.setFont(new java.awt.Font("Bitstream Charter",0,12));
						}
						{
							saveButton = new JButton();
							rightButtonPanel.add(saveButton);
							saveButton.setText("Save");
							saveButton.setFont(new java.awt.Font("Bitstream Charter",0,12));
							saveButton.setBorder(BorderFactory.createTitledBorder(""));
						}
					}
				}
			}
			{
				mainMenuBar = new JMenuBar();
				setJMenuBar(mainMenuBar);
				{
					menuEdit = new JMenu();
					mainMenuBar.add(menuEdit);
					menuEdit.setText("Edit");
					{
						menuOptions = new JMenuItem();
						menuEdit.add(menuOptions);
						menuOptions.setText("Options");
					}
				}
			}
			pack();
			this.setSize(650, 350);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}

	public JMenuItem getMenuOptions() {
		return menuOptions;
	}
	
	public JButton getConnectButton() {
		return connectButton;
	}
	
	public JButton getDisconnectButton() {
		return disconnectButton;
	}
	
	public JButton getRunButton() {
		return runButton;
	}	

	public JButton getBackButton() {
		return backButton;
	}

	public JButton getStopButton() {
		return stopButton;
	}
	
	public JButton getOpenFileButton() {
		return openFileButton;
	}
	
	public JButton getCleanFileButton() {
		return cleanFileButton;
	}
	public JButton getMesureBotao() {
		return mesureButton;
	}
	
	public JButton getCleanButton() {
		return cleanButton;
	}
	
	public JButton getSaveButton() {
		return saveButton;
	}
	
	public JTextField getSpeedField() {
		return speedField;
	}

	public JTextField getStepsField() {
		return stepField;
	}

	public JTextField getSpinField() {
		return spinField;
	}

	public JTextField getTurnField() {
		return turnField;
	}

	public JTextField getWalkField() {
		return walkField;
	}
	
	public JTextField getFileField() {
		return fileField;
	}	
	
	public JTextArea getDescriptionPanel() {
		return descriptionPanel;
	}	
}
